﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;

/// <summary>
/// order 的摘要说明
/// </summary>
public class order : SQLHelper
{
    private string onum;
    private string odate;
    private string odatejh;
    private string oaddress;
    private string otype;
    private string ocolor;
    private string oprice;
    private string oknum;
    private string osnum;
    private string osex;
    private string oname;
    private string ophone;
    
    public string num
    {
        get { return onum; }
        set { onum = value; }
    }
    public string date
    {
        get { return odate; }
        set { odate = value; }
    }
    public string datejh
    {
        get { return odatejh; }
        set { odatejh = value; }
    }
    public string address
    {
        get { return oaddress; }
        set { oaddress = value; }
    }
    public string type
    {
        get { return otype; }
        set { otype = value; }
    }
    public string color
    {
        get { return ocolor; }
        set { ocolor = value; }
    }
    public string price
    {
        get { return oprice; }
        set { oprice = value; }
    }
    public string knum
    {
        get { return oknum; }
        set { oknum = value; }
    }
    public string snum
    {
        get { return osnum; }
        set { osnum = value; }
    }
    public string sex
    {
        get { return osex; }
        set { osex = value; }
    }
    public string name
    {
        get { return oname; }
        set { oname = value; }
    }
    public string phone
    {
        get { return ophone; }
        set { ophone = value; }
    }
    
	public order()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    public SqlDataReader Getoneorder(order tmp)
    {
        string sql = "select * from order where Onum='" + tmp.num + "'";
        SqlDataReader rd = tmp.ExeReader(sql);
        return rd;
    }
    public DataSet GetAllOrder()
    {
        order tmp = new order();
        string sql = "select * from order";
        //,T_province,T_city where"
        //+
        //"t_users.u_PROVINCE=T_province.FID and T_province.FID=T_city.proID and "
        // +"t_users.u_city=T_city.FcityID";
        DataSet ds = tmp.GetDs(sql);
        return ds;
    }
}